package tech.aistar.day04.overloads;

/**
 * 本类用来演示: 方法的重载
 *
 * @author: success
 * @date: 2021/3/9 10:49 上午
 */
public class MethodDemo {
    public static void main(String[] args) {
        add(1,2.0);
    }

    public static int add(int n){
        System.out.println("----n----");
        return n;
    }

    public static int add(int n,double d){
        System.out.println("int,double");
        return n;
    }

    public static String add(String s){
        System.out.println("string");
        return s;
    }

    public static String add(int n,int m){
        System.out.println("int,int");
        return n+m+"";
    }
}
